home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / tsnr21.zip / SNR.DOC < prev    next >
Text File  |  1992-11-16  |  122KB  |  3,362 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                              TTuurrbboo SSeeaarrcchh AAnndd RReeppllaaccee(tm)
  30.  
  31.                           Copyright (c)1990 By Curtis Little
  32.  
  33.                                  All Rights Reserved
  34.  
  35.  
  36.  
  37.                        "Software Solutions That Make Sense"(tm)
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                                   TTaabbllee ooff CCoonntteennttss
  47.  
  48.  
  49.  
  50.           LLiicceennssee . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
  51.  
  52.           WWaarrrraannttyy  . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  53.  
  54.           GGeettttiinngg SSttaarrtteedd . . . . . . . . . . . . . . . . . . . . . . .   6
  55.                Acknowledgments  . . . . . . . . . . . . . . . . . . . .   6
  56.                How to Contact the Support Board . . . . . . . . . . . .   6
  57.                Required Equipment . . . . . . . . . . . . . . . . . . .   6
  58.                Typefaces Used in this Manual  . . . . . . . . . . . . .   6
  59.  
  60.           IInnttrroodduuccttiioonn  . . . . . . . . . . . . . . . . . . . . . . . .   8
  61.                Overview of Turbo SNR  . . . . . . . . . . . . . . . . .   8
  62.                Calling Turbo SNR  . . . . . . . . . . . . . . . . . . .   8
  63.                Turbo SNR Command Line Options . . . . . . . . . . . . .   9
  64.                Overview of the Command Line Options . . . . . . . . . .   9
  65.                Specifying Options . . . . . . . . . . . . . . . . . .    10
  66.  
  67.           CCoommmmaanndd LLiinnee OOppttiioonn DDeessccrriippttiioonnss  . . . . . . . . . . . . .    12
  68.                List Line Numbers (#)  . . . . . . . . . . . . . . . .    12
  69.                Strip 8th Bit (8)  . . . . . . . . . . . . . . . . . .    12
  70.                ASCII mode (a) . . . . . . . . . . . . . . . . . . . .    12
  71.                Backup Changed Files (b) . . . . . . . . . . . . . . .    13
  72.                Count matches (c)  . . . . . . . . . . . . . . . . . .    14
  73.                Search Child Subdirs (d) . . . . . . . . . . . . . . .    14
  74.                Ignore Case (i)  . . . . . . . . . . . . . . . . . . .    15
  75.                Keep Old Case (k)  . . . . . . . . . . . . . . . . . .    15
  76.                List Matching Lines (l)  . . . . . . . . . . . . . . .    17
  77.                One-One Table (o)  . . . . . . . . . . . . . . . . . .    17
  78.                Programmer Words (p) . . . . . . . . . . . . . . . . .    19
  79.                Regular Expressions (r)  . . . . . . . . . . . . . . .    20
  80.                     Replacement Using Regular Expressions . . . . . .    23
  81.                     How Regular Expressions are Evaluated . . . . . .    25
  82.                Verbose (v)  . . . . . . . . . . . . . . . . . . . . .    28
  83.                Word Search (w)  . . . . . . . . . . . . . . . . . . .    28
  84.                Interactive Mode (z) . . . . . . . . . . . . . . . . .    29
  85.  
  86.           SSuubbssttiittuuttiioonn SSttrriinnggss  . . . . . . . . . . . . . . . . . . .    31
  87.                Substitution String Syntax . . . . . . . . . . . . . .    31
  88.                Using Context Modes  . . . . . . . . . . . . . . . . .    31
  89.                Using String Specifiers  . . . . . . . . . . . . . . .    34
  90.                Using White Space in Strings . . . . . . . . . . . . .    35
  91.                Special Characters In Strings  . . . . . . . . . . . .    36
  92.  
  93.           UUssiinngg CCoommmmaanndd FFiilleess . . . . . . . . . . . . . . . . . . . .    40
  94.  
  95.           AAddvvaanncceedd TTooppiiccss . . . . . . . . . . . . . . . . . . . . . .    42
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.           AAppppeennddiixx AA -- TTuurrbboo SSNNRR MMeessssaaggeess . . . . . . . . . . . . . .    44
  104.                Informational Messages . . . . . . . . . . . . . . . .    45
  105.                Warning Messages . . . . . . . . . . . . . . . . . . .    48
  106.                Error Messages . . . . . . . . . . . . . . . . . . . .    49
  107.  
  108.           AAppppeennddiixx BB -- SSppeeeedd CCoonnssiiddeerraattiioonnss . . . . . . . . . . . . .    54
  109.  
  110.           AAppppeennddiixx CC -- TTeecchhnniiccaall SSppeecciiffiiccaattiioonnss . . . . . . . . . . .    56
  111.  
  112.           IInnddeexx . . . . . . . . . . . . . . . . . . . . . . . . . . .    57
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.           LLiicceennssee
  122.  
  123.           You are granted a nonexclusive personal right to use this
  124.           Software under the terms stated in this Agreement.  Unregistered
  125.           users are allowed to evaluate this software for a period NOT TO
  126.           EXCEED FIFTEEN (15) DAYS.  If, on or before this time expires,
  127.           you wish to continue using this software, you must register by
  128.           sending the registration fee to the author "Curtis Little" for
  129.           EACH COPY to be used.  You may not modify or alter the Software
  130.           or any of the accompanying files and/or documentation.  This
  131.           license is effective until terminated.  You may terminate it at
  132.           any time by destroying your copies of the Software.  It will also
  133.           terminate if you fail to comply with any term or condition of
  134.           this Agreement.  You agree upon such termination to destroy your
  135.           copies of the Software.
  136.  
  137.           The shareware version of this software may be freely distributed
  138.           as long as the following conditions are met:
  139.  
  140.                1)   All files are distributed as is and in unmodified form.
  141.  
  142.                2)   No more than a $5.00 handling fee can be charged
  143.                     without the express written consent of the author
  144.                     "Curtis Little".
  145.  
  146.                3)   This Software may not be distributed with or as a part
  147.                     of any other product or software package without the
  148.                     express written consent of the author "Curtis Little".
  149.  
  150.           Registered users may not transfer or assign ownership of this
  151.           license to any other person without the express written consent
  152.           of the author (Curtis Little).  Attempts to sublicense, assign,
  153.           or transfer any of the rights, duties, or obligations hereunder
  154.           is void.  You may not copy, modify, alter, electronically
  155.           transfer, or lease the registered version of this Software. 
  156.           Registered owners may use this software on more than one computer
  157.           providing there is no possibility it will be used on more than
  158.           one computer at any one time.
  159.  
  160.           Business and government users of the Software are not allowed the
  161.           evaluation period.  Use in a business or government institution
  162.           without first paying the required registration fee is in
  163.           violation of this license agreement.
  164.  
  165.           BByy uussiinngg tthhee SSooffttwwaarree yyoouu aacckknnoowwlleeddggee tthhaatt yyoouu hhaavvee rreeaadd tthhiiss
  166.           aaggrreeeemmeenntt,, uunnddeerrssttaanndd iitt aanndd aaggrreeee ttoo bbee bboouunndd bbyy iitt''ss tteerrmmss aanndd
  167.           ccoonnddiittiioonnss..
  168.  
  169.  
  170.           4                                   Turbo SNR - License Agreement
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.           WWaarrrraannttyy
  179.  
  180.           With respect to the physical diskette sent to registered owners,
  181.           the author warrants the same to be free from defects in materials
  182.           and workmanship for a period of 60 days from the date of 
  183.           registration.  In the event of notification within the warranty
  184.           period of defects in material or workmanship the author will
  185.           replace the defective diskette.  The remedy for breach of this
  186.           warranty shall be limited to replacement and shall not encompass
  187.           any other damages, including but not limited to loss of profit,
  188.           and special, incidental, consequential, or other similar claims.
  189.  
  190.           The author specifically disclaims all other warranties, expressed
  191.           or implied, including but not limited to implied warranties of
  192.           merchantability and fitness for a particular purpose and the
  193.           program license granted herein in particular, and without
  194.           limiting operation of the program license with respect to any
  195.           particular application, use, or purpose.  IN NO EVENT SHALL THE
  196.           AUTHOR BE LIABLE FOR ANY LOSS OF PROFIT, LOST SAVINGS, COMMERCIAL
  197.           DAMAGE, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT
  198.           OF THE USE OR INABILITY TO USE THIS SOFTWARE EVEN IF THE AUTHOR
  199.           (Curtis Little) OR AN AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED
  200.           OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER
  201.           PARTY.
  202.  
  203.           This agreement shall be governed by the laws of the state of
  204.           California.
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.           Turbo SNR - Users Guide                                         5
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.           GGeettttiinngg SSttaarrtteedd
  237.  
  238.  
  239.           AAcckknnoowwlleeddggmmeennttss
  240.  
  241.           In this manual several products are referred to:
  242.  
  243.                MS-DOS is a registered trademark of Microsoft Corporation.
  244.  
  245.                Brief is a registered trademark of Underware, Inc.
  246.  
  247.                IBM PC, XT, AT, and PS/2 are trademarks of International
  248.                Business Machines, Inc.
  249.  
  250.                Turbo C is a registered trademark of Borland, Inc.
  251.  
  252.                Turbo Search & Replace and Turbo SNR are trademarks of
  253.                Curtis Little
  254.  
  255.           HHooww ttoo CCoonnttaacctt tthhee SSuuppppoorrtt BBooaarrdd
  256.  
  257.           An electronic bulletin board is used to support Turbo Search &
  258.           Replace (herein referred to as Turbo SNR).  You may contact the
  259.           support board 24 hours a day.  The support board is:
  260.  
  261.                Lost At C BBS
  262.                (303) 280-1007
  263.  
  264.           In addition you may contact the author (Curtis Little) on (303)
  265.           280-1076  Be aware that if I need to call you back I will do so
  266.           as a collect call.
  267.  
  268.           If you have any questions/suggestions regarding Turbo SNR feel
  269.           free to call.  The support board is open to the public, however,
  270.           registered users will receive priority service.
  271.  
  272.  
  273.           RReeqquuiirreedd EEqquuiippmmeenntt
  274.  
  275.                IBM PC, XT, AT, PS/2 or MS-DOS Compatible
  276.                MS-DOS 2.0 or above
  277.                At least 128K memory available to application programs
  278.  
  279.  
  280.           TTyyppeeffaacceess UUsseedd iinn tthhiiss MMaannuuaall
  281.  
  282.           []        Square brackets are used to enclose optional
  283.                     parameters.  Text of this sort should not be typed
  284.                     verbatim.  Note that at times it is necessary to type
  285.  
  286.           6                                     Turbo SNR - Getting Started
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.                     the square brackets - in these cases it will be noted
  295.                     in the text that the square brackets are meant
  296.                     verbatim.
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.           Turbo SNR - Users Guide                                         7
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.           IInnttrroodduuccttiioonn
  353.  
  354.           OOvveerrvviieeww ooff TTuurrbboo SSNNRR
  355.  
  356.           Turbo SNR (Search & Replace) is a highly sophisticated program
  357.           designed to provide you the best search and replace capabilities
  358.           available.  Turbo SNR was designed as a command line utility to
  359.           allow unattended operation in addition to batch file operation. 
  360.           This section of the manual briefly talks about the calling syntax
  361.           for Turbo SNR and the various parameter types that are available. 
  362.           Later sections of the manual explain each of the options in
  363.           detail.
  364.  
  365.  
  366.           CCaalllliinngg TTuurrbboo SSNNRR
  367.  
  368.           When you call Turbo SNR you specify what it should do using
  369.           parameters on the command line.  With Turbo SNR you are not
  370.           restricted to using different types of parameters in a predefined
  371.           order; Turbo SNR can handle parameters in any order you specify
  372.           them.  The types of parameters that Turbo SNR accepts are:
  373.  
  374.                o    Options
  375.  
  376.                o    Substitution strings
  377.  
  378.                o    Command files
  379.  
  380.                o    File names
  381.  
  382.           Options configure the way Turbo SNR operates.  Any parameter that
  383.           starts with a '-' or '/' is considered to be an option.  There
  384.           are two categories of options that you should be aware of.  The
  385.           first category of option can be changed multiple times on the
  386.           command line.  Using this type of option you can cause Turbo SNR
  387.           to act one way for the part of the command line following the
  388.           option, and then differently when the same option is changed
  389.           later on the command line.  The second type of option is one that
  390.           will not cause Turbo SNR to act differently if it's value is
  391.           changed multiple times on the command line.  In the discussion on
  392.           options it will be noted anytime an option can be used multiple
  393.           times for different effects.
  394.  
  395.           Substitution strings specify what Turbo SNR should search for and
  396.           replace with.  You can specify as many substitution strings as
  397.           you desire.  The only limitation on the number of substitution
  398.           strings is the amount of memory available and the maximum length
  399.           allowed for a command line (which is a bit more restrictive than
  400.  
  401.  
  402.           8                                        Turbo SNR - Introduction
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.           memory limitations!).  Note that using command files (described
  411.           next) you can overcome the command line length limitation.
  412.  
  413.           Command files specify a file that Turbo SNR should read to get a
  414.           list of substitution strings.  Turbo SNR can handle as many
  415.           command files as you want to specify providing there's enough
  416.           memory to store all the substitution strings read from the files.
  417.  
  418.           File names specify the file(s) that Turbo SNR should operate on. 
  419.           Turbo SNR allows you to specify as many filespecs as you like -
  420.           any of the specified file names can contain wildcards.
  421.  
  422.  
  423.           TTuurrbboo SSNNRR CCoommmmaanndd LLiinnee OOppttiioonnss
  424.  
  425.           There are quite a few options available that allow you to control
  426.           how Turbo SNR operates.  This chapter will describe each of the
  427.           options, any limitations, and special considerations you need to
  428.           know about.  Before getting into the details of each option a
  429.           brief overview will be listed.
  430.  
  431.  
  432.           OOvveerrvviieeww ooff tthhee CCoommmmaanndd LLiinnee OOppttiioonnss
  433.  
  434.           As previously mentioned, Turbo SNR considers something to be an
  435.           option if it is preceded with a '-' or a '/' (the only exception
  436.           to this rule is the use of an option to specify a substitution
  437.           string - the s option).  The following lists the options that are
  438.           currently supported by Turbo SNR.  With Turbo SNR each option is
  439.           either ON or OFF.  If an option is ON it is considered to be a
  440.           'default' option by Turbo SNR and will be noted in the table
  441.           below:  (Note that options are not case sensitive)
  442.  
  443.                8    Strip the high bit from every character in the input
  444.                     files.
  445.  
  446.                ?    Displays a brief help screen listing all the available
  447.                     options in Turbo SNR.
  448.  
  449.                #    List line numbers that contained a match to at least
  450.                     one of the substitution strings.
  451.  
  452.                a    Use ASCII mode.
  453.  
  454.                b    Backup files that are changed.  
  455.                     **DEFAULT**
  456.  
  457.                c    Display a count on the number of strings replaced for
  458.                     each input file.
  459.  
  460.           Turbo SNR - Users Guide                                         9
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.                d    Search child subdirs for input files.
  469.  
  470.                h    Displays a brief help screen listing all the available
  471.                     options in Turbo SNR.
  472.  
  473.                i    Ignore case when searching.
  474.  
  475.                k    Keep the case of the string found when replacing.
  476.  
  477.                l    List each of the lines that contained a match to at
  478.                     least one of the substitution strings.
  479.  
  480.                o    Use the one to one table when possible.
  481.  
  482.                p    Search for "programmer" words (i.e. strings that would
  483.                     be considered identifiers or tokens in a typical
  484.                     programming language).
  485.  
  486.                r    Allow use of regular expressions in substitution
  487.                     strings.
  488.  
  489.                s    Specify a substitution string
  490.  
  491.                v    Verbose mode.
  492.                     **DEFAULT**
  493.  
  494.                w    Search for words (i.e. strings that would be considered
  495.                     words in a language).
  496.  
  497.                z    Interactive mode - prompt user before replacing each
  498.                     match.
  499.  
  500.  
  501.           SSppeecciiffyyiinngg OOppttiioonnss
  502.  
  503.           When Turbo SNR scans the command line it looks for options by
  504.           looking for a leading '-' or '/'.  Once a '-' or '/' is found
  505.           Turbo SNR considers the next block of text (until a white space
  506.           character is hit) to be options specified by the caller.  On the
  507.           command line you can turn options on and turn options off.  The
  508.           syntax for specifying an option is as follows:
  509.  
  510.                -option[-|+][option 2[-|+]][option n...]
  511.  
  512.           Immediately after each option an optional "sign" can be used to
  513.           specify whether you want to turn the flag on (+) or off (-).  If
  514.           the sign isn't specified the option is turned on.  To look at an
  515.           example let's say you want to use Turbo SNR to strip the high bit
  516.           of a Word Star file using ASCII mode, and don't want a backup
  517.  
  518.           10                                       Turbo SNR - Introduction
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.           file created.  The following lists several different ways to
  527.           specify these options (all examples do the same thing):
  528.  
  529.                -a -b- -8
  530.  
  531.                -a+b-8
  532.  
  533.                -ab-8
  534.  
  535.                -a+ -b- -8+
  536.  
  537.           As you can see there is a great deal of flexibility in how you
  538.           specify options to Turbo SNR.  Choose the method that you feel
  539.           most comfortable with.
  540.  
  541.           In the following Chapter each of the options will be explained in
  542.           detail.
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.           Turbo SNR - Users Guide                                        11
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.           CCoommmmaanndd LLiinnee OOppttiioonn DDeessccrriippttiioonnss
  585.  
  586.           LLiisstt LLiinnee NNuummbbeerrss ((##))
  587.  
  588.           S_ y_ n_ o_ p_ s_ i_ s_ 
  589.  
  590.           The # option tells Turbo SNR whether or not it should list the
  591.           line numbers for each line that contains at least one match. 
  592.           Line numbers containing multiple matches will only be listed
  593.           once.
  594.  
  595.           At default this option is off.
  596.  
  597.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  598.  
  599.           This option is only available when you use ASCII mode.  ASCII
  600.           mode will automatically be set when the line number option is
  601.           used.
  602.  
  603.  
  604.           SSttrriipp 88tthh BBiitt ((88))
  605.  
  606.           S_ y_ n_ o_ p_ s_ i_ s_ 
  607.  
  608.           The 8 option tells Turbo SNR whether or not it should strip the
  609.           high bit of the input file(s).  This option is handy for
  610.           converting the old Word Star format files to ASCII.
  611.  
  612.           At default this option is off.
  613.  
  614.  
  615.           AASSCCIIII mmooddee ((aa))
  616.  
  617.           S_ y_ n_ o_ p_ s_ i_ s_ 
  618.  
  619.           The a option tells Turbo SNR whether or not it should operate in
  620.           ASCII mode.  When Turbo SNR operates in ASCII mode it expects
  621.           each line in the file to be terminated with either a CR, LF, or
  622.           CRLF.
  623.  
  624.           At default this option is off.
  625.  
  626.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  627.  
  628.           ASCII mode will always create files that have standard MS-DOS
  629.           line terminators (a carriage return followed by a line feed).
  630.  
  631.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  632.  
  633.  
  634.           12                               Turbo SNR - Command Line Options
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.           Using ASCII mode simplifies the way you have to specify the end
  643.           of line character.  You can specify the end of line by using
  644.           either the linefeed (ascii character #10 or '\n') or the carriage
  645.           return (ascii character #13 or '\r').  In ASCII mode these
  646.           characters are treated as being the same (the carriage return
  647.           specifier is translated to a linefeed by Turbo SNR), and are
  648.           translated internally by SNR to match whatever type of line
  649.           terminator the input file really uses.
  650.  
  651.           Although this end of line translation makes things easier for
  652.           you, it may be confusing for those in touch with how MS-DOS
  653.           stores files.  In DOS an ASCII file is typically stored with a
  654.           trailing CR LF.  In SNR if you use ASCII mode and specify to
  655.           search for the CR followed by an LF you won't match the end of
  656.           every line (only the end of lines followed by a blank line) since
  657.           Turbo SNR translates the CR and LF search specifiers for you.
  658.  
  659.           If you use either \r or \n in your replace value Turbo SNR will
  660.           substitute a CR LF combination when it replaces (since CR LF is
  661.           the DOS standard).
  662.  
  663.  
  664.           BBaacckkuupp CChhaannggeedd FFiilleess ((bb))
  665.  
  666.           S_ y_ n_ o_ p_ s_ i_ s_ 
  667.  
  668.           This option specifies whether or not Turbo SNR should backup the
  669.           files that it changes.  When Turbo SNR creates a backup file it
  670.           does so by creating a file with the same name as the original
  671.           with the exception of a $ appended to the input file extension. 
  672.           If the input file has a three character extension the last
  673.           character will be replaced with a $.
  674.  
  675.           For example the following are the names of some input files and
  676.           the names of the backup files that would be created:
  677.  
  678.                I_ n_ p_ u_ t_  f_ i_ l_ e_           B_ a_ c_ k_ u_ p_  N_ a_ m_ e_ 
  679.  
  680.                TEST.C              TEST.C$
  681.                TEST.ASM            TEST.AS$
  682.                TEST                TEST.$
  683.  
  684.           At default this option is on.
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.           Turbo SNR - Users Guide                                        13
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  702.  
  703.           If you're not sure the substitution strings you specified will
  704.           have the exact results you want it is suggested that you leave
  705.           the backup option turned on.  It is easy to get results you
  706.           didn't think about if you're not careful when using Turbo SNR
  707.           (especially when you use regular expressions).  A good backup
  708.           file never hurt anyone!
  709.  
  710.  
  711.           CCoouunntt mmaattcchheess ((cc))
  712.  
  713.           S_ y_ n_ o_ p_ s_ i_ s_ 
  714.  
  715.           This option specifies whether or not Turbo SNR should display a
  716.           count of the number of matches (i.e. strings replaced) for each
  717.           input file.
  718.  
  719.           At default this option is off.
  720.  
  721.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  722.  
  723.           If this option is used in combination with interactive mode (z
  724.           option), line numbers (# option), or list lines (l option) the
  725.           count will be displayed at the end of a file.  Otherwise a
  726.           running total will be displayed on the screen showing how many
  727.           matches occurred in a file.
  728.  
  729.  
  730.           SSeeaarrcchh CChhiilldd SSuubbddiirrss ((dd))
  731.  
  732.           S_ y_ n_ o_ p_ s_ i_ s_ 
  733.  
  734.           This option is used to tell Turbo SNR if it should search the
  735.           child directories of the file specifiers for matching input
  736.           files.
  737.  
  738.           When this option is on Turbo SNR searches the child directories
  739.           of each specified input file for other files that match the file
  740.           specs.  As an example assume the following files are specified on
  741.           the command line:
  742.            
  743.                *.txt c:\turboc\readme.* \lib\*.txt
  744.            
  745.           Turbo SNR would search:
  746.            
  747.                Starting with the current drive and directory Turbo SNR
  748.                would search for all files with an extension of .TXT.  Any
  749.  
  750.           14                               Turbo SNR - Command Line Options
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.                child directories from the current would be traversed as
  759.                well.
  760.  
  761.                Starting in the C:\TURBOC directory Turbo SNR would search
  762.                for all files with a name of README.  Any child directories
  763.                from Turbo C would also be traversed.
  764.  
  765.                Starting on the current drive in the \LIB directory Turbo
  766.                SNR would search for files with an extension of .TXT.  Child
  767.                directories of \LIB would also be traversed.
  768.  
  769.           To get Turbo SNR to search an entire drive for a specific file
  770.           spec you'd simply use the search subdir option and specify the
  771.           filespec to search for as:
  772.  
  773.                DRIVE:\FILESPEC
  774.  
  775.           As mentioned before, Turbo SNR fully supports the DOS wildcards
  776.           in file specifications.
  777.  
  778.           At default this option is off.
  779.  
  780.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  781.  
  782.           The total number of files that can be processed by Turbo SNR is
  783.           only limited by memory.
  784.  
  785.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  786.  
  787.           Note that it is possible to accidently specify the same file name
  788.           twice using the search subdir option (as could also be done
  789.           manually by specifying the same input file twice on the command
  790.           line).  If you don't want Turbo SNR to process the same file(s)
  791.           more than once you should be careful not to specify file specs
  792.           that will cause multiple processing to occur.
  793.  
  794.  
  795.           IIggnnoorree CCaassee ((ii))
  796.  
  797.           S_ y_ n_ o_ p_ s_ i_ s_ 
  798.  
  799.           This option tells Turbo SNR whether it should ignore case when
  800.           looking for a match.
  801.  
  802.           At default this option is off.
  803.  
  804.  
  805.           KKeeeepp OOlldd CCaassee ((kk))
  806.  
  807.  
  808.           Turbo SNR - Users Guide                                        15
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.           S_ y_ n_ o_ p_ s_ i_ s_ 
  817.  
  818.           This option tells Turbo SNR whether it should use the case for
  819.           the value that was matched.  For example, the following lists the
  820.           values found and the value that would be used to replace with (in
  821.           this example ignore case is set to true):
  822.  
  823.                Substitution string:  "you=thou"
  824.  
  825.                V_ a_ l_ u_ e_  M_ a_ t_ c_ h_ e_ d_             R_ e_ p_ l_ a_ c_ e_ d_  W_ i_ t_ h_ 
  826.  
  827.                you                      thou
  828.                You                      Thou
  829.                YOU                      THOu
  830.  
  831.           As you can see from the examples above, when the replacement
  832.           value is longer than the search value the trailing characters
  833.           will remain in the original case you specified.
  834.  
  835.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  836.  
  837.           To use this option you must also specify the ignore case option. 
  838.           Turbo SNR won't let you keep existing case if case isn't being
  839.           ignored in the search string (after all, if you know the specific
  840.           case you're searching for you should know the case you want to
  841.           replace with!).
  842.            
  843.           As was shown in the examples above, Turbo SNR doesn't change the
  844.           case for positions in the replacement string that don't exist in
  845.           the search string.  However, special consideration needs to be
  846.           given when you use regular expressions since variable length
  847.           strings can be matched.  As an example the following lists
  848.           several strings in the order they were processed in a selected
  849.           document:
  850.  
  851.                Substitution string: "t*e=this"
  852.  
  853.                V_ a_ l_ u_ e_  M_ a_ t_ c_ h_ e_ d_             R_ e_ p_ l_ a_ c_ e_ d_  W_ i_ t_ h_ 
  854.  
  855.                the                      this
  856.                The                      This
  857.                THESE                    THIS
  858.                the                      thiS
  859.  
  860.           Note in particular the last entry - the last character has the
  861.           case that was last used since the search value is shorter than
  862.           the value being replaced with.
  863.  
  864.  
  865.  
  866.           16                               Turbo SNR - Command Line Options
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.           LLiisstt MMaattcchhiinngg LLiinneess ((ll))
  875.  
  876.           S_ y_ n_ o_ p_ s_ i_ s_ 
  877.  
  878.           This option tells Turbo SNR whether or not it should list the
  879.           lines that contain at least one match.
  880.  
  881.           At default this option is off.
  882.  
  883.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  884.  
  885.           ASCII mode is automatically set when you specify you want
  886.           matching lines to be listed.
  887.  
  888.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  889.  
  890.           Note that matching lines will only be listed once no matter how
  891.           many additional matches they may contain.
  892.  
  893.  
  894.           OOnnee--OOnnee TTaabbllee ((oo))
  895.  
  896.           S_ y_ n_ o_ p_ s_ i_ s_ 
  897.  
  898.           This option specifies whether or not Turbo SNR should use the
  899.           one-one table when possible.  To understand what this option does
  900.           you need to be aware how Turbo SNR stores substitution strings. 
  901.           A detailed description on the substitution tables is saved for
  902.           the advanced topics chapter (see page 42 for details), however,
  903.           I'll briefly describe the tables here as well.
  904.  
  905.           In Turbo SNR there are two distinct tables used to store
  906.           substitution strings as follows:
  907.            
  908.           One-One Table  This table can only contain entries that replace a
  909.                          single character with another single character. 
  910.                          Replacement using the one-one table is done at the
  911.                          i/o level while the input file is being read. 
  912.                          This means that entries in the one-one table will
  913.                          not obey the word flags available with Turbo SNR. 
  914.                          The one-one table provides a way to quickly
  915.                          replace single characters - the speed of using the
  916.                          one-one table is hundreds of times faster than
  917.                          using the other type of table Turbo SNR has.
  918.  
  919.           Standard Table The standard table used by Turbo SNR allows you to
  920.                          replace any length string with another string of
  921.                          any length.  This table can also store character
  922.  
  923.  
  924.           Turbo SNR - Users Guide                                        17
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.                          for character replacements that the one-one table
  933.                          is capable of storing.
  934.  
  935.           The following table goes over some of the advantages and
  936.           disadvantages of the one-one table:
  937.  
  938.           Advantages:    *VERY* fast.  Using the one-one table you can
  939.                          replace character for character almost as fast as
  940.                          your PC can read and write the file.  There is
  941.                          very little processing overhead needed to replace
  942.                          with the one-one table.
  943.  
  944.                          Allows you to ignore the setting of the word flags
  945.                          for specified characters (the one-one table usage
  946.                          can be toggled on and off to accommodate this).
  947.  
  948.                          Since replacement is done at the I/O level it is
  949.                          convenient and fast to create a table that can
  950.                          upper case or lower case a file.
  951.  
  952.           Disadvantages: Can only be used to do character to character
  953.                          substitution.  You can't delete characters or
  954.                          replace/search for strings of multiple characters
  955.                          using the one-one table.
  956.  
  957.                          Since the word flags are not honored by the one-
  958.                          one table you can't use it to locate one letter
  959.                          words - the standard table must be used to locate
  960.                          words.
  961.  
  962.                          Context modes are not supported in the one-one
  963.                          table.  Only entries with both a search and
  964.                          replace context of 0 qualify for the one-one
  965.                          table.
  966.  
  967.           At default this flag is off.
  968.  
  969.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  970.  
  971.           The one-one table can be toggled on and off during the course of
  972.           the command line allowing you to specify certain values to put in
  973.           the one to one table (when possible) while putting other
  974.           character-character replacements in the standard table.  For
  975.           example:
  976.            
  977.                SNR -o @ONE2ONE.TAB -o- @STANDARD.TAB -o @ONE.TAB
  978.  
  979.           The example above would cause the entries in the ONE2ONE.TAB and
  980.           ONE.TAB command files to be placed in the one-one table when
  981.  
  982.           18                               Turbo SNR - Command Line Options
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.           possible, and the entries in the STANDARD.TAB would be placed in
  991.           the standard table.
  992.  
  993.           Note that once a character in the one-one table has been
  994.           redefined to another character the one-one entry can not be
  995.           changed again (instead the new definition will be placed in the
  996.           standard table).  For instance if the following lines were in a
  997.           command file read by Turbo SNR (Assuming one-one usage is turned
  998.           on):
  999.            
  1000.                a=z       ;This entry will be placed in the one-one table
  1001.                          ;redefining the letter 'a'
  1002.  
  1003.                z=a       ;This entry will be placed in the one-one table 
  1004.                          ;redefining the letter 'z'
  1005.  
  1006.                a=b       ;This entry will *NOT* be placed in the one-one
  1007.                          ;table since 'a' has already been redefined in 
  1008.                          ;the one-one table.  Instead this entry will be
  1009.                          ;placed in the standard table.
  1010.  
  1011.           Again, you should refer to the advanced topics chapter for a
  1012.           detailed discussion of the tables used by Turbo SNR.
  1013.  
  1014.           Note that if you specify a search or replace context other than 0
  1015.           an entry will not be qualified to go in the one-one table.  (See
  1016.           the discussion on substitution strings on page 31 for details
  1017.           about the context options).
  1018.  
  1019.  
  1020.           PPrrooggrraammmmeerr WWoorrddss ((pp))
  1021.  
  1022.           S_ y_ n_ o_ p_ s_ i_ s_ 
  1023.  
  1024.           This option specifies whether or not Turbo SNR should search for
  1025.           strings that would be considered words in a typical programming
  1026.           language.  This is useful when you have source code and want to
  1027.           change a variable name or function name in your program.  When
  1028.           this option is set the search strings will only be replaced if
  1029.           Turbo SNR considers the matching text to be a "programmer" word.
  1030.  
  1031.           At default this option is turned off.
  1032.  
  1033.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  1034.  
  1035.           Turbo SNR considers a string to be a programmer word under the
  1036.           following conditions:
  1037.  
  1038.  
  1039.  
  1040.           Turbo SNR - Users Guide                                        19
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.                1)   The matching string in the input file must be preceded
  1049.                     by one of the following:  whitespace (' ' or \t), a
  1050.                     newline (\r or \n), open parenthesis, quote character
  1051.                     (' or " or `), a plus sign (+), a minus sign (-), an
  1052.                     asterisk (*), a forward slash (/), a period (.), a
  1053.                     caret (^), a percent sign (%), a dollar sign ($), an at
  1054.                     sign (@), an exclamation point (!), an equal sign (=),
  1055.                     a vertical bar (|), an ampersand (&), a curly brace ({
  1056.                     or }), a square bracket ([ or ]), a tilde (~), a
  1057.                     question mark (?), a greater than sign (>), a less than
  1058.                     sign (<), a colon (:), a semicolon (;), or a comma (,).
  1059.  
  1060.                     If the string found in the input file is preceded by a
  1061.                     character not specified above it is not considered to
  1062.                     be a programmer word.
  1063.  
  1064.                2)   The matching string in the input file must be followed
  1065.                     by one of the following:  whitespace (' ' or \t), a
  1066.                     newline (\r or \n), closing parenthesis, quote
  1067.                     character (' or "), a colon (:), a semicolon (;), a
  1068.                     plus sign (+), a minus sign (-), an asterisk (*), a
  1069.                     forward slash (/), a period (.), a caret (^), a percent
  1070.                     sign (%), a dollar sign ($), an at sign (@), an
  1071.                     exclamation point (!), an equal sign (=), a vertical
  1072.                     bar (|), an ampersand (&), a curly brace ({ or }), a
  1073.                     square bracket ([ or ]), a tilde (~), a question mark
  1074.                     (?), a greater than sign (>), a less than sign (<), or
  1075.                     a comma (,).
  1076.  
  1077.           You should take special care since by the above definition of a
  1078.           programmer word Turbo SNR will consider matches in quotes to be
  1079.           just as valid as matches outside of quotes.
  1080.  
  1081.  
  1082.           RReegguullaarr EExxpprreessssiioonnss ((rr))
  1083.  
  1084.           S_ y_ n_ o_ p_ s_ i_ s_ 
  1085.  
  1086.           This option specifies whether or not Turbo SNR should allow use
  1087.           of regular expressions in the substitution strings.  The use of
  1088.           regular expressions is a very powerful feature that allows you to
  1089.           do many things with Turbo SNR that aren't possible with other
  1090.           Search & Replace type programs.
  1091.  
  1092.           At default regular expression usage is off.
  1093.  
  1094.           Note that in ASCII mode, regular expressions may not be used to
  1095.           go past the end of a line unless you specifically include the
  1096.           line terminator in the search expression.  In ASCII mode, none of
  1097.  
  1098.           20                               Turbo SNR - Command Line Options
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.           the wildcard/meta characters can be used to match the newline
  1107.           character.  You must use the \n in the search expression to match
  1108.           a newline character.
  1109.  
  1110.           In binary mode, wildcard/meta characters can match and search
  1111.           through new lines without problems.
  1112.  
  1113.           The regular expressions supported by Turbo SNR are similar to
  1114.           those supported by Brief.  The following lists the meta-
  1115.           characters and their meanings.
  1116.  
  1117.                @         Match zero or more repeats of the preceding
  1118.                          character or expression.  This meta character
  1119.                          matches the most possible occurrences of a pattern
  1120.                          that satisfy the match (it does a maximal
  1121.                          closure).
  1122.  
  1123.                          Ex:  a@t
  1124.                               Matches any of the following:
  1125.                               t
  1126.                               at
  1127.                               aat
  1128.                               aaat
  1129.                               ...and so on.
  1130.  
  1131.                +         This meta character does the same thing as @,
  1132.                          except it matches 1 or more occurrences of the
  1133.                          preceding character or expression.  The most
  1134.                          possible occurrences of a pattern that satisfy the
  1135.                          match will be found.
  1136.  
  1137.                          Ex:  a+t
  1138.                               Matches any of the following:
  1139.                               at
  1140.                               aat
  1141.                               aaat
  1142.                               ...and so on.
  1143.  
  1144.                *         Matches anything.  This wildcard does a minimal
  1145.                          match if you specify something after it (i.e.
  1146.                          a*b), otherwise it matches all the way to (but not
  1147.                          including) the end of line.
  1148.  
  1149.                          Ex:  t*e
  1150.                               Matches any of the following:
  1151.                               the
  1152.                               that was what he
  1153.                               today's time
  1154.  
  1155.  
  1156.           Turbo SNR - Users Guide                                        21
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.                ?         Matches any single character (except the newline).
  1165.  
  1166.                < or ^    Matches the start of a line.  Note that this is
  1167.                          good to insure the next part of the search is at
  1168.                          the start of a line.
  1169.  
  1170.                          Ex:  <How
  1171.                               Matches the word 'How' when it is the first
  1172.                               thing in a line.  The word 'How' embedded in
  1173.                               a line would not be matched. 
  1174.  
  1175.                > or $    Matches the end of a line (not the newline
  1176.                          character).  This is good to insure the previous
  1177.                          search expression was the last thing contained on
  1178.                          a line.
  1179.  
  1180.                          Ex:  \t>
  1181.                               Matches every line that has a tab character
  1182.                               immediately before the newline character. 
  1183.  
  1184.                [xyz]     Set:  Matches if the character for the position is
  1185.                          included in the set.
  1186.  
  1187.                          Ex:  [abc]xyz
  1188.                               Matches any of the following:
  1189.                               axyz
  1190.                               bxyz
  1191.                               cxyz
  1192.  
  1193.                [~a]      Matches anything that isn't in the set.
  1194.                [^b]
  1195.  
  1196.                [a-z]     Matches anything between the two specifications.
  1197.  
  1198.                          Ex:  [0-9]
  1199.                               Matches anything that is a digit.
  1200.  
  1201.                |         Specifies a logical OR condition.  This matches
  1202.                          either the preceding or following character or
  1203.                          expression.
  1204.  
  1205.                          Ex 1:     a|b
  1206.                                    Matches the letter a or the letter b
  1207.  
  1208.                          Ex 2:     mine|yours
  1209.                                    Matches the words:  mineours and
  1210.                                    minyours (not mine or yours like you
  1211.                                    might have expected).  To see how to
  1212.  
  1213.  
  1214.           22                               Turbo SNR - Command Line Options
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.                                    match the words mine or yours read
  1223.                                    through the next section about grouping.
  1224.  
  1225.                {}        Group characters and expressions together for
  1226.                          searching.  Note that group numbers (for the
  1227.                          purpose of replacing) start with zero.  The use of
  1228.                          groups allows you to:
  1229.  
  1230.                               Group text together so you can refer to it in
  1231.                               the replacement string by group number (see
  1232.                               discussion below for how replacement using
  1233.                               regular expressions works).
  1234.  
  1235.                               Control the way a search pattern is evaluated
  1236.                               (see the discussion below on how regular
  1237.                               expressions are evaluated).
  1238.  
  1239.                          Ex 1:     {abc}xyz
  1240.                                    Matches occurrences of abcxyz (sets up
  1241.                                    one group - in the event of a match
  1242.                                    group 0 contains the text abc).
  1243.  
  1244.                          Ex 2:     {mine}|{yours}
  1245.                                    Matches occurrences of the words mine or
  1246.                                    yours (sets up two groups - in the event
  1247.                                    of a match the group that matched
  1248.                                    contains the matching text, the other
  1249.                                    group contains nothing).
  1250.  
  1251.                          Ex 3:     {{zortech}|{borland}}
  1252.                                    Matches occurrences of the words zortech
  1253.                                    or borland (sets up three groups as
  1254.                                    follows):
  1255.  
  1256.                                    Group 0 contains {zortech}|{borland},
  1257.                                    which contains either zortech or borland
  1258.                                    (whichever matched).
  1259.  
  1260.                                    Group 1 contains zortech (or nothing if
  1261.                                    zortech wasn't matched).
  1262.  
  1263.                                    Group 2 contains borland (or nothing if
  1264.                                    borland wasn't matched).
  1265.  
  1266.  
  1267.           RReeppllaacceemmeenntt UUssiinngg RReegguullaarr EExxpprreessssiioonnss
  1268.  
  1269.           When you replace a string in Turbo SNR you generally would tell
  1270.           SNR exactly what string to insert as the replacement.  The use of
  1271.  
  1272.           Turbo SNR - Users Guide                                        23
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.           regular expressions allows you to replace using part of whatever
  1281.           matched by making use of the groups.  When you use regular
  1282.           expressions you can specify group numbers in the replacement
  1283.           string by using the following syntax:
  1284.  
  1285.                \g9
  1286.  
  1287.           Where 9 is the number of the group you wish to insert in the
  1288.           replacement string.  As mentioned before groups are numbered
  1289.           starting with zero.  Group numbering is based on the position of
  1290.           the opening curly brace ({).  Going from the left to right the
  1291.           first { starts group 0, the next is group 1, etc.
  1292.  
  1293.           The following examples demonstrate how to use this powerful
  1294.           feature of Turbo SNR.
  1295.  
  1296.                Ex 1:     If you specify the following pattern as the search
  1297.                          pattern:
  1298.  
  1299.                               {[Tt]he} program
  1300.  
  1301.                          And use the following pattern as the replacement:
  1302.  
  1303.                               \g0 best program
  1304.  
  1305.                          The \g0 will be replaced with the string that
  1306.                          matched group 0:  {[Tt]he}.  The pattern for group
  1307.                          0 will match all occurrences of the words The and
  1308.                          the.  In this example every occurrence of the
  1309.                          pattern (The program or the program) will be
  1310.                          replaced with The best program or the best
  1311.                          program.
  1312.  
  1313.                Ex 2:     If you specify the following pattern as the search
  1314.                          pattern:
  1315.  
  1316.                               {his}|{her}
  1317.  
  1318.                          And use the following pattern as the replacement:
  1319.  
  1320.                               \g1
  1321.  
  1322.                          The \g1 will be replaced with the string that
  1323.                          matched group 1.  Group 1 will contain the word
  1324.                          her when matched, or NULL if the expression
  1325.                          matched his.  This replacement would cause all
  1326.                          occurrences of his to be removed from the file.
  1327.  
  1328.  
  1329.  
  1330.           24                               Turbo SNR - Command Line Options
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.           HHooww RReegguullaarr EExxpprreessssiioonnss aarree EEvvaalluuaatteedd
  1339.  
  1340.           The meta characters used by Turbo SNR for regular expressions
  1341.           have a set precedence just as operators in other languages do. 
  1342.           The following table lists the precedence for regular expression
  1343.           meta characters:
  1344.  
  1345.                {} []     Grouping has the highest precedence.  If you
  1346.                          enclose one or more characters within braces or
  1347.                          brackets it is considered to be a single grouped
  1348.                          expression.
  1349.  
  1350.                          Ex:  If you search for:
  1351.  
  1352.                                    {his}|{her}
  1353.  
  1354.                               You are searching for his or her.  If you
  1355.                               search for:
  1356.  
  1357.                                    his|her
  1358.  
  1359.                               You are searching for hiser or hiher.
  1360.  
  1361.                @ | +     These characters have the next highest precedence
  1362.                          and are matched from the left to right.
  1363.  
  1364.                          Ex:  The following patterns show simple examples
  1365.                               of how these operators are treated when used
  1366.                               alone:
  1367.  
  1368.                               1@2  (Searches for 0 or more 1's followed by
  1369.                                    a 2).
  1370.  
  1371.                               1|2  (Searches for either a 1 or a 2).
  1372.  
  1373.                               1+2  (Searches for 1 or more 1's followed by
  1374.                                    a 2).
  1375.  
  1376.                               The following pattern shows an example that
  1377.                               may not be clear when it comes to how the
  1378.                               operators interact together.  This
  1379.                               demonstrates the idea that you must keep in
  1380.                               mind these operators with equal precedence
  1381.                               are read from the left to the right:
  1382.  
  1383.                               1|2@3     (Searches for 0 or more 1's or 2's
  1384.                                         followed by a 3).  Since the OR
  1385.                                         operator is the leftmost it is
  1386.                                         evaluated first followed by the @. 
  1387.  
  1388.           Turbo SNR - Users Guide                                        25
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.                                         This expression could also be
  1397.                                         expressed as:
  1398.  
  1399.                                              {1|2}@3
  1400.  
  1401.           After processing the characters listed in the precedence table
  1402.           above the remaining characters are concatenated. 
  1403.  
  1404.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  1405.  
  1406.           There can be a maximum of 10 groups defined in the search
  1407.           pattern.
  1408.  
  1409.           In ASCII mode meta characters (i.e. *) won't go beyond the end of
  1410.           a line.
  1411.  
  1412.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  1413.  
  1414.           Note that the use of regular expressions will slow Turbo SNR
  1415.           quite a bit.
  1416.  
  1417.  
  1418.           SSppeecciiffyy aa SSuubbssttiittuuttiioonn SSttrriinngg ((ss))
  1419.  
  1420.           S_ y_ n_ o_ p_ s_ i_ s_ 
  1421.  
  1422.           This option allows you to specify a substitution string from the
  1423.           command line.  Note that substitution strings can also be
  1424.           specified using command files (see the chapter on command files
  1425.           on page 40 for details).  You may freely intermix the use of the
  1426.           s option and command files.
  1427.  
  1428.           A detailed description of substitution strings will be presented
  1429.           in the chapter on substitution strings (see page 31).  In this
  1430.           section I will only briefly cover how substitution strings are
  1431.           specified.
  1432.  
  1433.           A substitution string can have up to 4 different fields as
  1434.           follows:
  1435.  
  1436.                o    Search context
  1437.  
  1438.                o    Search value
  1439.  
  1440.                o    Replace context
  1441.  
  1442.                o    Replace value
  1443.  
  1444.  
  1445.  
  1446.           26                               Turbo SNR - Command Line Options
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.           Of these fields only the search value is required.  All other
  1455.           fields are optional and have defaults if not specified.  The
  1456.           context fields default to 0 when not specified, and the replace
  1457.           value defaults to NULL when not specified (i.e. causes the
  1458.           matching string to be deleted).  The syntax for specifying a
  1459.           search string using the s option is:
  1460.  
  1461.            -s
  1462.           "[search_context:]search_value=[replace_context:][replace_val]"
  1463.  
  1464.           If specified the context fields should be a decimal integer from
  1465.           0 to 9 followed immediately by a colon.  The context is used when
  1466.           searching for a match - Turbo SNR will only look for strings with
  1467.           a search context that match the current context (or have the
  1468.           global context of 9).  When a match occurs Turbo SNR replaces the
  1469.           match and then sets the current context to the replace context
  1470.           for the matching substitution string.
  1471.  
  1472.           The search value is whatever text you want to search for
  1473.           immediately followed by an equal sign.
  1474.  
  1475.           Lastly, the replace value is the string that you wish to replace
  1476.           the matched search string with.
  1477.  
  1478.           For example, to replace all occurrences of the word "all" with
  1479.           the word "most" you could specify the following:
  1480.  
  1481.                -s "all=most"
  1482.  
  1483.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  1484.  
  1485.           The number of strings you specify using the command line is only
  1486.           limited by the maximum command line length allowed by DOS.
  1487.  
  1488.           There are several characters that Turbo SNR considers command
  1489.           characters and won't allow you to place direct in the search or
  1490.           replace strings.  These special characters must be preceded with
  1491.           a backslash to be used in the search or replace strings.  The
  1492.           characters are:
  1493.  
  1494.                "    '    \    :    ;    =
  1495.  
  1496.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  1497.  
  1498.           If you have many substitution strings you may wish to use a
  1499.           command file to specify them instead of manually doing it at the
  1500.           command line.
  1501.  
  1502.  
  1503.  
  1504.           Turbo SNR - Users Guide                                        27
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.           VVeerrbboossee ((vv))
  1513.  
  1514.           S_ y_ n_ o_ p_ s_ i_ s_ 
  1515.  
  1516.           This option specifies whether or not Turbo SNR should output the
  1517.           file names as they're processed.
  1518.  
  1519.           At default this option is on.
  1520.  
  1521.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  1522.  
  1523.           Several of the other options automatically turn verbose mode on. 
  1524.           These options include:  count matches, list line numbers, list
  1525.           matching lines, and interactive mode.
  1526.  
  1527.  
  1528.           WWoorrdd SSeeaarrcchh ((ww))
  1529.  
  1530.           S_ y_ n_ o_ p_ s_ i_ s_ 
  1531.  
  1532.           This option specifies whether or not Turbo SNR should search for
  1533.           strings that would be considered words in English text.  This is
  1534.           useful when you have a text file and want to change all
  1535.           occurrences of selected words to something else.  When this
  1536.           option is set the search strings will only be replaced if Turbo
  1537.           SNR considers the matching text to be a word.
  1538.  
  1539.           At default this option is turned off.
  1540.  
  1541.           S_ p_ e_ c_ i_ a_ l_  C_ o_ n_ s_ i_ d_ e_ r_ a_ t_ i_ o_ n_ s_ 
  1542.  
  1543.           Turbo SNR considers a string to be a word under the following
  1544.           conditions:
  1545.  
  1546.                1)   The matching string in the input file must be preceded
  1547.                     by one of the following:  whitespace (' ' or \t), a
  1548.                     newline (\r or \n), open parenthesis, quote character
  1549.                     (' or " or `), or a forward slash (/).
  1550.  
  1551.                     If the string found in the input file is preceded by a
  1552.                     character not specified above it is not considered to
  1553.                     be a word.
  1554.  
  1555.                2)   The matching string in the input file must be followed
  1556.                     by one of the following:  whitespace (' ' or \t), a
  1557.                     newline (\r or \n), closing parenthesis, quote
  1558.                     character (' or "), a colon (:), a semicolon (;), a
  1559.                     forward slash (/), a period (.), an exclamation point
  1560.                     (!), a question mark (?), or a comma (,).
  1561.  
  1562.           28                               Turbo SNR - Command Line Options
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.           IInntteerraaccttiivvee MMooddee ((zz))
  1572.  
  1573.           S_ y_ n_ o_ p_ s_ i_ s_ 
  1574.  
  1575.           This option specifies whether or not Turbo SNR should allow you
  1576.           to interactively specify which matches to replace.  If you set
  1577.           this option Turbo SNR will prompt for each match to get your
  1578.           input as to what should be done.
  1579.  
  1580.           When a match occurs Turbo SNR will display the matching text in
  1581.           reverse video (the text is shown in context when possible, so the
  1582.           reverse video helps the matched value to stand out for you). 
  1583.           After the matching text is displayed Turbo SNR displays the value
  1584.           that it will be replaced with (if the match is to be deleted from
  1585.           the file Turbo SNR displays:  <<NULL>> as the replacement value). 
  1586.           Finally, Turbo SNR prompts you for the action to take.
  1587.  
  1588.           Messages that are blinking during interactive mode are displayed
  1589.           by Turbo SNR to advise you of special conditions.  The following
  1590.           is a list of possible blinking messages and the reasons they
  1591.           would be displayed:
  1592.  
  1593.                M_ e_ s_ s_ a_ g_ e_                        R_ e_ a_ s_ o_ n_  T_ u_ r_ b_ o_  S_ N_ R_  d_ i_ s_ p_ l_ a_ y_ s_ 
  1594.  
  1595.                <<START OF MATCH NOT SHOWN>>  This message is displayed if
  1596.                                              Turbo SNR is unable to show
  1597.                                              you the match that occurred
  1598.                                              from the beginning.  An
  1599.                                              example of how this can happen
  1600.                                              is when something matches
  1601.                                              around a newline in ASCII mode
  1602.                                              (in ASCII mode Turbo SNR will
  1603.                                              only display the line that
  1604.                                              contains the ending portion of
  1605.                                              the match).
  1606.  
  1607.                <<MORE>>                      This message is displayed when
  1608.                                              the replace value is longer
  1609.                                              than Turbo SNR is showing. 
  1610.                                              Turbo SNR limits the amount of
  1611.                                              the replacement value shown to
  1612.                                              one screen line.
  1613.  
  1614.  
  1615.           The following is the prompt Turbo SNR displays at each match:
  1616.  
  1617.           Replace?  <Y>es, <N>o, <A>nd the rest, <I>gnore the rest, <ESC>
  1618.           to Quit
  1619.  
  1620.           Turbo SNR - Users Guide                                        29
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.           You specify the option you desire by pressing the appropriate key
  1629.           (the valid keys are displayed between the <>).  The actions taken
  1630.           by Turbo SNR for the various keys are:
  1631.  
  1632.                Y    (Yes) This tells Turbo SNR to replace the current match
  1633.                     and continue searching.
  1634.  
  1635.                N    (No) This tells Turbo SNR to skip replacing the current
  1636.                     match and continue searching.
  1637.  
  1638.                A    (And the rest) This tells Turbo SNR to replace the
  1639.                     current match as well as all remaining matches -
  1640.                     without prompting for the additional matches.  (I.E.
  1641.                     turns interactive mode off and automatically replaces
  1642.                     all remaining matches).
  1643.  
  1644.                I    (Ignore the rest) This tells Turbo SNR to skip the
  1645.                     current match as well as all remaining matches -
  1646.                     without prompting further (interactive mode is turned
  1647.                     off and all remaining matches are automatically
  1648.                     skipped).
  1649.  
  1650.                ESC  (ESC to quit) Causes Turbo SNR to abort returning you
  1651.                     to the DOS prompt (or shell/menu that called Turbo
  1652.                     SNR).
  1653.  
  1654.           L_ i_ m_ i_ t_ a_ t_ i_ o_ n_ s_ 
  1655.  
  1656.           Interactive mode currently only works on 100% Compatible IBM PCs. 
  1657.           The method used for screen output is direct video writes - you
  1658.           should not use this method if your PC is not completely IBM
  1659.           compatible.
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.           30                               Turbo SNR - Command Line Options
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.           SSuubbssttiittuuttiioonn SSttrriinnggss
  1687.  
  1688.           One of the most important types of input you specify to Turbo SNR
  1689.           is in the form of substitution strings.  Substitution strings
  1690.           specify what strings should be searched for and the replacement
  1691.           values to use when a match is found.  In addition, Turbo SNR
  1692.           supports the idea of contexts allowing you to replace certain
  1693.           strings with one value the first time, another value the second
  1694.           time, etc.  The following sections describe each aspect of a
  1695.           substitution string.
  1696.  
  1697.  
  1698.           S_ u_ b_ s_ t_ i_ t_ u_ t_ i_ o_ n_  S_ t_ r_ i_ n_ g_  S_ y_ n_ t_ a_ x_ 
  1699.  
  1700.           Substitution strings used by Turbo SNR have a defined syntax. 
  1701.           The following lists the syntax for specifying a substitution
  1702.           string:
  1703.  
  1704.  
  1705.           ["][search_context:]search_val=[replace_context:][replace_val]["]
  1706.  
  1707.           As mentioned at the start of this documentation the [] are used
  1708.           to signify optional parameters.  You should note that the only
  1709.           required data for a substitution string is the search value
  1710.           immediately followed by an equal sign.
  1711.  
  1712.           There are two categories of fields possible in a substitution
  1713.           string.  They are:
  1714.  
  1715.                o    Context Specifier
  1716.                o    String Specifier
  1717.  
  1718.           The context specifier is a decimal number followed immediately by
  1719.           a colon (the context specification is optional). The string
  1720.           specifier category includes both the search value and the replace
  1721.           value (the replace value is optional - if not specified Turbo SNR
  1722.           defaults to deletion of the search value from the input files).
  1723.  
  1724.           Each of the field categories will be explained in detail in the
  1725.           following sections.
  1726.  
  1727.  
  1728.           U_ s_ i_ n_ g_  C_ o_ n_ t_ e_ x_ t_  M_ o_ d_ e_ s_ 
  1729.  
  1730.           Turbo SNR supports context sensitive searching and replacing
  1731.           through the use of two optional "context" fields in the
  1732.           substitution string.  If you don't manually specify the context
  1733.           fields for a substitution string Turbo SNR will search for and
  1734.           replace every match in the input file(s).  There may be times
  1735.  
  1736.           Turbo SNR - Users Guide                                        31
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.           when you want to replace a certain string with one value the
  1745.           first time it occurs, another value the second time, etc...  This
  1746.           is where the context fields come in.  Turbo SNR supports a total
  1747.           of 10 different context settings numbered 0 through 9.  When
  1748.           Turbo SNR first opens an input file it is working in context
  1749.           number 0.
  1750.  
  1751.           The first nine contexts will be referred to as "user definable
  1752.           contexts"; these are the contexts you assign to substitution
  1753.           strings you want Turbo SNR to search for only when the current
  1754.           context matches the user defined context.
  1755.  
  1756.           The last context (number 9) is a "global" context.  This context
  1757.           is for strings that you want searched for no matter what the
  1758.           current context really is.  Using the global context you can
  1759.           intermix strings that need to be searched for no matter what with
  1760.           other strings that you only want searched for under certain
  1761.           circumstances.
  1762.  
  1763.           In the substitution string the optional context fields let you
  1764.           specify the context Turbo SNR should be in before searching for
  1765.           the string as well as the context to switch to after replacing
  1766.           the string.
  1767.  
  1768.           The search context field indicates the context Turbo SNR should
  1769.           be in before trying to look for the search value.  If you don't
  1770.           specify the search context a default of 0 is used by Turbo SNR. 
  1771.           Turbo SNR will not search for values if the search context for
  1772.           the search string doesn't match the current context (with the
  1773.           exception of those strings using the global context of 9).
  1774.  
  1775.           When Turbo SNR replaces a matching string it will set the context
  1776.           to the value specified as the replace context.  If you don't
  1777.           specify the replace context for a string a default of 0 is used.
  1778.  
  1779.           When you specify one or both of the context fields you use the
  1780.           number of the context and follow it immediately with a colon. 
  1781.           For example, to specify a search context of 1 and a replace
  1782.           context of 5 the format would be:
  1783.  
  1784.                1:search_value=5:replace_value
  1785.  
  1786.           Let's take a look at a few examples that show how this would
  1787.           work.  
  1788.           Example:  There are times when you may want to send a message or
  1789.                     file to another person and insure that only the
  1790.                     intended recipient will be able to read what you sent. 
  1791.                     To accomplish this you must come up with some sort of
  1792.                     cipher that can be used to scramble the message.  By
  1793.  
  1794.           32                               Turbo SNR - Substitution Strings
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.                     using a cipher you can create a message that can only
  1803.                     be read by those who know how to decipher the message.
  1804.  
  1805.                     At a simple level of ciphering messages (or encrypting
  1806.                     them as it's sometimes referred to) a translation table
  1807.                     for each character of the alphabet is created so that
  1808.                     one letter is always used in place of another.  For
  1809.                     example, every occurrence of the letter 'a' might be
  1810.                     replaced with the letter 'w'.  Using substitution the
  1811.                     intended message would be translated to have words that
  1812.                     look unreadable without knowing what letters were
  1813.                     substituted for other letters.  For example you might
  1814.                     develop a cipher that would translate:
  1815.  
  1816.                          Meet me at noon behind the gate
  1817.  
  1818.                     To:  Ztta zt ha dssd rtxbdq axt ihat
  1819.  
  1820.                     The bad part about this type of cipher is that it is
  1821.                     fairly easy for an outsider to decipher using trial and
  1822.                     error.  With just a little effort it is easy to figure
  1823.                     out most of the message above.  The longer a message is
  1824.                     the easier it is to figure out the cipher that was
  1825.                     used.  Knowing just a little about the expected
  1826.                     frequency of letters in the English language makes it
  1827.                     even easier to decipher a message of this type since
  1828.                     the letters were changed but the frequency of each was
  1829.                     not (i.e. by figuring out that t stands for e the
  1830.                     message above begins to unravel).  To make things more
  1831.                     secure it is desirable to replace a certain letter with
  1832.                     one thing and then another thing the next time.
  1833.  
  1834.                     You may be wondering (or may have already figured out)
  1835.                     how Turbo SNR can help do something like file
  1836.                     encryption.  The answer is simple:  By using context
  1837.                     sensitive replacements you can make a message nearly
  1838.                     impossible to decipher by persons not knowing the exact
  1839.                     cipher you used.
  1840.  
  1841.                     In the above example the cipher used was as follows:
  1842.  
  1843.                          m = z     e = t     t = a     a = h     n = d
  1844.                          o = s     b = r     h = x     i = b     d = q
  1845.                          g = i
  1846.  
  1847.                     Using Turbo SNR we can spice things up a bit by making
  1848.                     the whole message one big word as well as using context
  1849.                     to replace a character with different things at
  1850.                     different times.  Included with Turbo SNR are two
  1851.  
  1852.           Turbo SNR - Users Guide                                        33
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.                     sample command files called CIPHER.TAB and DECIPHER.TAB
  1861.                     (see the discussion on command files on page 40 for
  1862.                     details about using command files).  Feel free to work
  1863.                     with these (if you're familiar with C take a look at
  1864.                     CIPHER.C which is also included!).  When you use SNR
  1865.                     and one of the command files on a text file it's
  1866.                     contents will become scrambled until SNR is used with
  1867.                     the other command file.  Using the CIPHER.TAB file on
  1868.                     the original message changed:
  1869.  
  1870.                          Meet me at noon behind the gate
  1871.  
  1872.                     To:  A](gUaPUtgUqmdqk{(B}qVU:B]AG':P
  1873.  
  1874.  
  1875.                     As you can see this version of the encrypted text is a
  1876.                     bit more difficult to figure out than the simple
  1877.                     example presented before.
  1878.  
  1879.           Example:  To provide a simpler example of how multiple contexts
  1880.                     work assume the following substitution strings were
  1881.                     specified:
  1882.  
  1883.                          "0:abc=1:xyz"
  1884.                          "1:abc=0:abc"
  1885.  
  1886.                     The example above would cause the text 'abc' to be
  1887.                     replaced with 'xyz' every other occurrence.  If a file
  1888.                     contained the following line:
  1889.  
  1890.                          abcabcabcabcabc
  1891.  
  1892.                     And the substitution strings listed above were used it
  1893.                     would be converted to:
  1894.  
  1895.                          xyzabcxyzabcxyz
  1896.  
  1897.           The examples listed above are just an introduction of what can be
  1898.           accomplished using the context support of Turbo SNR.
  1899.  
  1900.  
  1901.           U_ s_ i_ n_ g_  S_ t_ r_ i_ n_ g_  S_ p_ e_ c_ i_ f_ i_ e_ r_ s_ 
  1902.  
  1903.           The strings you want to search for and replace with are
  1904.           considered string specifiers.  Turbo SNR provides some powerful
  1905.           features that help you specify any possible mixture of data
  1906.           (including non-ascii data).  This section of the manual describes
  1907.           in detail how strings can be specified.  You can specify any
  1908.  
  1909.  
  1910.           34                               Turbo SNR - Substitution Strings
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.           possible string value using the features available for specifying
  1919.           strings to Turbo SNR.
  1920.  
  1921.           As mentioned before there are two ways you can specify
  1922.           substitution strings:
  1923.  
  1924.                o    On the command line using the -s option
  1925.  
  1926.                o    In a command file
  1927.  
  1928.  
  1929.           U_ s_ i_ n_ g_  W_ h_ i_ t_ e_  S_ p_ a_ c_ e_  i_ n_  S_ t_ r_ i_ n_ g_ s_ 
  1930.  
  1931.           It is important to note that Turbo SNR will ignore any white
  1932.           space (i.e. spaces or tabs) in a substitution string unless they
  1933.           are in quotes.  This convention is necessary to allow free form
  1934.           comments in the command files (see the discussion on command
  1935.           files on page 40 for details) as well as prevent possible syntax
  1936.           errors when reading the command line.
  1937.  
  1938.           For simplicity I strongly suggest you enclose all substitution
  1939.           strings in quotes, however, for those that desire to know the
  1940.           details I will describe the rules Turbo SNR uses for white space
  1941.           treatment in the following examples.  If you're not interested in
  1942.           the details presented feel free to skip to the next section.
  1943.  
  1944.           Let's look at a couple of examples that will illustrate the point
  1945.           about white space being ignored when it's not quoted:
  1946.  
  1947.           Ex:  If you were to type the following at the command line:
  1948.  
  1949.                     SNR -s Copyright = Copyr *.c
  1950.  
  1951.                Turbo SNR would have no way of knowing what you were trying
  1952.                to do.  The above command line would cause the following
  1953.                messages:
  1954.  
  1955.                (CMD Line) Line (0):  = required to specify replace value.
  1956.                Warning:  no files matching (=)
  1957.                Warning:  no files matching (Copyr)
  1958.                *** 1 Errors Found ***
  1959.  
  1960.                These errors were all caused because of the white space
  1961.                embedded in the substitution string.  When scanning the
  1962.                command line a white space character not in quotes is
  1963.                considered to be the end of the option that was being
  1964.                defined.
  1965.  
  1966.  
  1967.  
  1968.           Turbo SNR - Users Guide                                        35
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.                To clear the error messages you could specify the above
  1977.                command line as follows:
  1978.  
  1979.                     SNR -s "Copyright=Copyr" *.c
  1980.  
  1981.                 
  1982.           Ex:  Now let's look at the same replacement string used in a
  1983.                command file called MY.TAB.  Assuming the command file
  1984.                contained the following line (the left margin is marked
  1985.                below for clarity):
  1986.  
  1987.                     Copyright = Copyr             ;This is a comment
  1988.                ^
  1989.                |
  1990.                Left margin of command file
  1991.  
  1992.                This would cause all occurrences of "Copyright" to be
  1993.                replaced with "Copyr".  Note that the leading, trailing and
  1994.                embedded spaces are ignored by Turbo SNR since they aren't
  1995.                in quotes.  If we were to specify the line above as:
  1996.  
  1997.                     "Copyright = Copyr"           ;This is a comment
  1998.                ^
  1999.                |
  2000.                Left margin of command file
  2001.  
  2002.                This would cause all occurrences of "Copyright " to be
  2003.                replaced with " Copyr".  Note that the leading and trailing
  2004.                spaces are ignored (since they aren't in quotes), but as
  2005.                shown the embedded spaces that are inside quotes are
  2006.                inserted in the strings.  Note that this specification does
  2007.                the same thing as:
  2008.  
  2009.                     "Copyright "    =    " Copyr" ;This is a comment
  2010.  
  2011.           That should give you a general feel for how spaces and tabs are
  2012.           handled by Turbo SNR.  Again, I suggest you enclose the entire
  2013.           substitution string in quotes for simplicity.
  2014.  
  2015.  
  2016.           S_ p_ e_ c_ i_ a_ l_  C_ h_ a_ r_ a_ c_ t_ e_ r_ s_  I_ n_  S_ t_ r_ i_ n_ g_ s_ 
  2017.  
  2018.           There are certain characters that Turbo SNR considers to be
  2019.           "special" and won't allow you to simply insert in a string.  To
  2020.           overcome this limitation Turbo SNR supports the idea of using an
  2021.           "escape character" to insert special characters.  Those familiar
  2022.           with a programming language like C are likely to already
  2023.           understand how this works.  Anytime you want to specify a special
  2024.           character in a string you precede it with the backslash character
  2025.  
  2026.           36                               Turbo SNR - Substitution Strings
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.           (\).  When Turbo SNR finds a \ in a string it treats the next
  2035.           character in a special way as defined in the following table
  2036.           (note that Turbo SNR considers the special characters to be the
  2037.           same no matter what the actual case is - upper case is treated
  2038.           like lower case for the purposes of the special characters):
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.           Turbo SNR - Users Guide                                        37
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.            Char  Description
  2093.  
  2094.  
  2095.             \b   This causes a backspace to be inserted in the string.
  2096.  
  2097.             \n   This causes a linefeed to be inserted in the string.
  2098.  
  2099.             \r   This causes a carriage return to be inserted in the
  2100.                  string.
  2101.  
  2102.             \t   This causes a tab to be inserted in the string.
  2103.  
  2104.             \x9  This causes a hex byte to be inserted in the string. 
  2105.                  Note that you may specify multiple values with one
  2106.                  escape code as in the following:
  2107.  
  2108.                       \xff101d00      ;Inserts 4 hex bytes in a string.
  2109.                       \xff\x10\x1d\x0 ;Does the same as above using
  2110.                                       ;multiple escape codes.
  2111.  
  2112.                  Turbo SNR considers the hex specification to be over
  2113.                  when it encounters a non-hex character in the string. 
  2114.                  Each two hex digits in the string are interpreted as a
  2115.                  single character (byte) value.  In the above example the
  2116.                  character values ff, 10, 1d, and 0 would be inserted in
  2117.                  the string.
  2118.  
  2119.             \99  This causes a decimal byte to be inserted in the string. 
  2120.                  Note that you may only specify one byte value using
  2121.                  decimal (i.e. a value from 0 - 255) per escape code. 
  2122.                  For example:
  2123.  
  2124.                       \999      ;This causes an error message
  2125.                       \10       ;Causes a linefeed (character 10) to be
  2126.                                 ;inserted in the string.
  2127.  
  2128.             \g   If you're using regular expressions a 'g' following a
  2129.                  backslash in the replace value causes group
  2130.                  substitution.  See the discussion on replacement using
  2131.                  regular expressions on page 23 for details.
  2132.  
  2133.  
  2134.                AAnnyy cchhaarraacctteerr nnoott lliisstteedd aabboovvee iiss iinnsseerrtteedd aass aa lliitteerraall
  2135.                cchhaarraacctteerr iiff iitt iiss pprreecceeddeedd wwiitthh aa \\..  
  2136.  
  2137.           If you are using regular expressions and wish to insert a literal
  2138.           character in the search value that is the same as a regular
  2139.           expression meta character (i.e. * @ | + < > $ ~ [ ] ^) you must
  2140.  
  2141.  
  2142.           38                               Turbo SNR - Substitution Strings
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.           precede the character with a \ to keep it from being interpreted
  2151.           as a regular expression meta character.
  2152.  
  2153.           The following lists the characters that MUST be escaped to be
  2154.           inserted in a string.  Attempts to insert the characters listed
  2155.           below without preceding them with a \ will generally cause an
  2156.           error message when Turbo SNR reads the substitution string:
  2157.  
  2158.                ;;          \          =         "          '          :
  2159.  
  2160.  
  2161.           With the exception of the quotes and the backslash all the
  2162.           characters listed above are considered commands by Turbo SNR if
  2163.           they aren't preceded with a \.  Failure to not use a preceding \
  2164.           when you want to insert a quote or backslash in a string will
  2165.           generally cause SNR to give undesired results.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.           Turbo SNR - Users Guide                                        39
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.           UUssiinngg CCoommmmaanndd FFiilleess
  2209.  
  2210.           This chapter describes the details on using command files for
  2211.           specifying substitution strings.  Command files are a handy way
  2212.           to store a set of related substitution strings to be used on
  2213.           files without having to manually specify the individual strings
  2214.           each time you use Turbo SNR.  Additionally, command files can be
  2215.           used to get around the DOS maximum command line length allowing
  2216.           you to specify as many substitution strings at once as memory
  2217.           will hold.
  2218.  
  2219.           To specify the use of a command file you proceed the filename
  2220.           with an @ sign.  If you don't specify an extension a default of
  2221.           .TAB will be used.  As an example, the following command lines
  2222.           tell Turbo SNR to use a command file called CIPHER.TAB:
  2223.  
  2224.                SNR @cipher MYFILE.EXT
  2225.  
  2226.                SNR MYFILE.TXT @cipher.tab
  2227.  
  2228.           You can specify multiple command files by simply including more
  2229.           on the command line.  Turbo SNR supports as many command files as
  2230.           you can specify on the DOS command line (the only limitation is
  2231.           available memory).
  2232.  
  2233.           You may also toggle on and off the use of a one-one table between
  2234.           command files.  For instance:
  2235.  
  2236.                     SNR -o @table.tab -o- @other.tab MYFILE.EXT
  2237.            
  2238.           The example above uses the one-one table when possible for the
  2239.           entries in the command file called TABLE.TAB.  The entries in
  2240.           OTHER.TAB are not allowed to go in the one-one table.  For
  2241.           details on the one-one table see the discussion on page 17.
  2242.  
  2243.           There are three types of data that can be in a command file as
  2244.           follows:
  2245.  
  2246.                o    Substitution Strings
  2247.  
  2248.                o    White space (or blank lines)
  2249.  
  2250.                o    Comments
  2251.  
  2252.  
  2253.           When you use a command file to specify substitution strings you
  2254.           don't precede the strings with a -s or /s like you need to on the
  2255.           command line.  All you need to do in the command file is list
  2256.           each substitution string on a separate line.  If you are unsure
  2257.  
  2258.           40                                Turbo SNR - Using Command Files
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.           of the format required for substitution strings refer to the -s
  2267.           option on page 26 or the chapter titled 'Substitution Strings' on
  2268.           page 31.
  2269.  
  2270.           As mentioned earlier white space outside of quotes is ignored by
  2271.           Turbo SNR.  This allows you to have leading and/or trailing
  2272.           spaces as well as blank lines in the command file without it
  2273.           changing the substitution strings specified.  If you want to use
  2274.           white space in a substitution string the string must be quoted.
  2275.  
  2276.           Comments are supported in command files to allow you a way to
  2277.           document what the command file does as well as any special things
  2278.           you want to say about the substitution strings.
  2279.  
  2280.           When Turbo SNR finds a semi-colon on a line it considers the
  2281.           remaining text on the line to be a comment.  The comment can
  2282.           contain any type of information or data you desire - Turbo SNR
  2283.           completely ignores the remainder of a line once the semi-colon is
  2284.           reached.
  2285.  
  2286.           If you want to specify a semi-colon in the search or replace
  2287.           value of a substitution string you must precede the semi-colon
  2288.           with a backslash.
  2289.  
  2290.           See the example files that came with Turbo SNR for a typical
  2291.           example of what a command file can contain.
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.           Turbo SNR - Users Guide                                        41
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.           AAddvvaanncceedd TTooppiiccss
  2325.  
  2326.           This chapter has several sections that deal with some of the more
  2327.           advanced topics regarding the use of Turbo SNR.  This chapter
  2328.           covers topics like the order Turbo SNR looks at substitution
  2329.           strings , using the one-one table along with the standard table,
  2330.           and multi-pass processing.
  2331.  
  2332.  
  2333.           T_ a_ b_ l_ e_ s_  a_ n_ d_  t_ h_ e_  O_ r_ d_ e_ r_  S_ u_ b_ s_ t_ i_ t_ u_ t_ i_ o_ n_  S_ t_ r_ i_ n_ g_ s_  A_ r_ e_  L_ o_ o_ k_ e_ d_  A_ t_ 
  2334.  
  2335.           This section describes in detail the way that Turbo SNR looks for
  2336.           a match against substitution strings.  After reading this section
  2337.           you will have a good idea how Turbo SNR is doing things based on
  2338.           what you give it for options and substitution strings.  At
  2339.           default Turbo SNR works well for virtually all the cases it's
  2340.           given - this section helps those who desire to know how to fine
  2341.           tune the way Turbo SNR operates.
  2342.  
  2343.           As has been mentioned several times there are two levels of
  2344.           replacement used by Turbo SNR.  To recap, these are:
  2345.  
  2346.                One-One Table       Replaces character for character as the
  2347.                                    file is being read.  Replacements in the
  2348.                                    one-one table are complete before Turbo
  2349.                                    SNR even starts to search for matches
  2350.                                    with the substitution strings contained
  2351.                                    in the standard table.
  2352.  
  2353.                Standard Table      This is the table that is used by Turbo
  2354.                                    SNR for all the strings that don't
  2355.                                    qualify for the one-one table
  2356.                                    (qualifying one-one strings are only
  2357.                                    placed in the standard table if the use
  2358.                                    of the one-one table hasn't been enabled
  2359.                                    or if the entry in the one-one table is
  2360.                                    already used).  Strings in this table
  2361.                                    are searched for after the one to one
  2362.                                    replacement has been done.
  2363.  
  2364.           If the option to strip the 8th bit is turned on the bit stripping
  2365.           will occur immediately after the one-one replacement (or as the
  2366.           file is being read if the one-one table isn't being used).  This
  2367.           means the bit stripping occurs before the standard table strings
  2368.           are searched for.
  2369.  
  2370.           Once one-one replacement and 8th bit stripping have been
  2371.           completed Turbo SNR begins searching the file for matches to the
  2372.           substitution strings contained in the standard table.
  2373.  
  2374.           42                                    Turbo SNR - Advanced Topics
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.           When regular expressions aren't used, the order you specify
  2383.           substitution strings in doesn't matter.  In regular expression
  2384.           mode, Turbo SNR looks for matches in the standard table in the
  2385.           order the strings were specified.
  2386.  
  2387.           When regular expressions are used Turbo SNR scans the input file
  2388.           for a match to the first character of the substitution strings
  2389.           (again note that strings are checked in the order they were
  2390.           specified).  Once a match on the first character occurs Turbo SNR
  2391.           checks to see if the entire search value matches.  If the search
  2392.           value doesn't match Turbo SNR goes back where it was and starts
  2393.           scanning again for the next first character match.
  2394.  
  2395.           You should be aware that replacements are not searched for a
  2396.           match to one of the substitution strings.  When a string is
  2397.           inserted in the file Turbo SNR will begin searching the text
  2398.           immediately following the replaced data.
  2399.  
  2400.  
  2401.           M_ u_ l_ t_ i_ -_ P_ a_ s_ s_  P_ r_ o_ c_ e_ s_ s_ i_ n_ g_ 
  2402.  
  2403.           Turbo SNR allows you to make multiple passes on the same file. 
  2404.           At times this type of processing can be handy.  One example of
  2405.           this is the encryption of files.  For instance if you had a file
  2406.           named MYFILE.TXT and typed the following at the command line
  2407.           (assuming you still have the CIPHER.TAB and DECIPHER.TAB
  2408.           available):
  2409.  
  2410.                snr @cipher MYFILE.TXT MYFILE.TXT MYFILE.TXT
  2411.  
  2412.           The only way to decrypt the file would be to process it the same
  2413.           number of passes by:
  2414.  
  2415.                snr @decipher MYFILE.TXT MYFILE.TXT MYFILE.TXT
  2416.  
  2417.           Since Turbo SNR doesn't search for a match in the replacement
  2418.           strings you may wish to use multi-pass processing for special
  2419.           effects on the resulting text from the first pass. 
  2420.  
  2421.           Your imaginations the limit using Turbo SNR!
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.           Turbo SNR - Users Guide                                        43
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.           AAppppeennddiixx AA -- TTuurrbboo SSNNRR MMeessssaaggeess
  2441.  
  2442.           There are quite a few messages that can be generated by Turbo SNR
  2443.           while it is in use.  This appendix lists the messages generated
  2444.           by Turbo SNR in three categories:
  2445.  
  2446.                o    Informational  These are messages displayed to advise
  2447.                                    of things such as the number of
  2448.                                    replacements (i.e. when you turn count
  2449.                                    mode on), or display the replace values
  2450.                                    and ask for input in interactive mode. 
  2451.                                    These type of messages are normal when
  2452.                                    you set certain options in Turbo SNR.
  2453.  
  2454.                o    Warning        These are messages displayed to warn you
  2455.                                    about a possible error condition. 
  2456.                                    Warnings occur for things like such as
  2457.                                    an input file that can't be opened (i.e.
  2458.                                    doesn't exist or is read only).
  2459.  
  2460.                o    Error          There are messages that are displayed to
  2461.                                    advise you of an error condition that
  2462.                                    Turbo SNR feels you should correct
  2463.                                    before it proceeds.  A typical example
  2464.                                    of an error is when Turbo SNR detects a
  2465.                                    problem with the syntax of the
  2466.                                    substitution string or runs out of
  2467.                                    memory.
  2468.  
  2469.           Of the various categories only those messages that are considered
  2470.           errors will stop Turbo SNR from continuing operation.  The
  2471.           following pages list the various messages and a description of
  2472.           what the likely cause of the problem is.  The messages are listed
  2473.           alphabetically within each category to help simplify locating a
  2474.           particular message.
  2475.  
  2476.           For the purposes of this appendix only the error message text
  2477.           will be listed in the tables.  Many of the messages have
  2478.           diagnostic information preceding them such as the file name, line
  2479.           numbers, and message category (i.e. some specify whether it is a
  2480.           warning or an error).  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.           44                       Turbo SNR - Appendix A, Program Messages
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.           I_ n_ f_ o_ r_ m_ a_ t_ i_ o_ n_ a_ l_  M_ e_ s_ s_ a_ g_ e_ s_ 
  2500.  
  2501.           *** 9999 Errors Found ***
  2502.                This is a message that is displayed when Turbo SNR detected
  2503.                syntax errors in the substitution strings.  This message is
  2504.                simply to advise you of the total number of errors
  2505.                encountered.
  2506.  
  2507.           9999 matches, 9999 replacements.
  2508.                This message is displayed when count mode is used with
  2509.                interactive mode.  At the end of each file this message
  2510.                indicates the total number of matches that occurred in
  2511.                addition to the number you told Turbo SNR to replace.
  2512.  
  2513.           9999 replacements
  2514.                This message is displayed as a running counter of the number
  2515.                of replacements in a file when you are using the count
  2516.                option.
  2517.  
  2518.           Backing...
  2519.                This message is displayed to let you know Turbo SNR is
  2520.                backing up the current file.  This message will only be
  2521.                displayed when verbose mode is on (see discussion on verbose
  2522.                mode on page 28 for details).
  2523.  
  2524.           Closing...
  2525.                This message is displayed to let you know Turbo SNR is
  2526.                closing the current file.  This message will only be
  2527.                displayed when verbose mode is on (see discussion on verbose
  2528.                mode on page 28 for details).
  2529.  
  2530.           Done!
  2531.                This is yet another message displayed when verbose mode is
  2532.                on.  This message advises Turbo SNR is finished with the
  2533.                current file.  (see discussion on verbose mode on page 28
  2534.                for details).
  2535.  
  2536.           *** Ignoring remaining matches per you request. ***
  2537.                This message is displayed when you tell Turbo SNR to ignore
  2538.                the current match as well as the remaining matches during
  2539.                interactive mode.
  2540.  
  2541.           <<MORE>>
  2542.                This message is displayed as blinking text during
  2543.                interactive mode to let you know the replacement value for
  2544.                the current match is longer than Turbo SNR is displaying
  2545.                (see the discussion on interactive mode on page 29 for
  2546.                details).
  2547.  
  2548.           Turbo SNR - Users Guide                                        45
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.           ** Not Changed **
  2557.                This message is displayed to advise when a file is left
  2558.                unchanged.  This occurs when ASCII mode is being used and
  2559.                Turbo SNR determines during the replacement process the file
  2560.                is not an ASCII file (or has a line longer than the max
  2561.                allowed length of 8096 bytes).
  2562.  
  2563.           <<NULL>>
  2564.                This message is displayed during interactive mode to let you
  2565.                know the matched data will be replaced with nothing (i.e. it
  2566.                is to be deleted).  See the discussion on interactive mode
  2567.                on page 29 for details.
  2568.  
  2569.           Remaining table memory: 9999
  2570.                This message is displayed after Turbo SNR reads all the
  2571.                command files and parses the command line substitution
  2572.                strings to give you a rough estimate on the amount of free
  2573.                memory remaining.  Note that when you specify that Turbo SNR
  2574.                should search child subdirs some of this memory will be
  2575.                required to store the names of matching files in the
  2576.                subdirs.
  2577.  
  2578.           Replace? <Y>es, <N>o, <A>nd the rest, <I>gnore the rest, <ESC> to
  2579.           Quit
  2580.                This prompt is displayed when a match occurs during
  2581.                interactive mode (see the discussion on interactive mode on
  2582.                page 29 for details).
  2583.  
  2584.           **Replaced**
  2585.                This message is displayed during interactive mode when you
  2586.                tell Turbo SNR to replace the current match.
  2587.  
  2588.           *** Replacing remaining matches per your request. ***
  2589.                This message is displayed when you tell Turbo SNR to replace
  2590.                the current as well as the remaining matches during
  2591.                interactive mode.
  2592.  
  2593.           Scanning directories for files matching: FILE...
  2594.                This message is printed to advise Turbo SNR is searching the
  2595.                child subdirectories for files matching the one listed in
  2596.                the message.  This message is displayed when you have
  2597.                verbose set on and use the search dir option.
  2598.  
  2599.           **Skipped**
  2600.                This message is displayed during interactive mode when you
  2601.                tell Turbo SNR to skip the current match.
  2602.  
  2603.           <<START OF MATCH NOT SHOWN>>
  2604.  
  2605.  
  2606.           46                       Turbo SNR - Appendix A, Program Messages
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.                This message is displayed as blinking text during
  2615.                interactive mode when the start of the matching data was not
  2616.                displayed by Turbo SNR (see the discussion on interactive
  2617.                mode on page 29 for details).
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.           Turbo SNR - Users Guide                                        47
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.           W_ a_ r_ n_ i_ n_ g_  M_ e_ s_ s_ a_ g_ e_ s_ 
  2674.  
  2675.           FILE.EXT is read only.  ***Skipped***
  2676.                This message warns you that the specified file has the read
  2677.                only bit and is not going to be processed by Turbo SNR as
  2678.                you requested.  You must set the read only attribute off if
  2679.                you desire to process the file with Turbo SNR.
  2680.  
  2681.           No files matching (FILE)
  2682.                This message warns you that a matching file couldn't be
  2683.                found for the specified file specification.
  2684.  
  2685.           Unable to open FILE!
  2686.                This message warns you that Turbo SNR is unable to open the
  2687.                specified file for reading.  This can occur if the file is
  2688.                locked (i.e. already in inclusive use in a SHARE
  2689.                environment) or the specified file is a directory.
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.           48                       Turbo SNR - Appendix A, Program Messages
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.           E_ r_ r_ o_ r_  M_ e_ s_ s_ a_ g_ e_ s_ 
  2731.  
  2732.           = required to specify replace value.
  2733.                This error occurs when an equal sign isn't included in the
  2734.                substitution string on the specified line of the command
  2735.                file.  An equal sign is required to mark the end of the
  2736.                value to search for.
  2737.  
  2738.           Ambiguous regular expression not allowed (leading/trailing |).
  2739.                This error means that the regular expression located on the
  2740.                specified line has a leading or trailing | (logical OR
  2741.                operator).  This is not valid syntax for a regular
  2742.                expression.
  2743.  
  2744.           Command file name expected
  2745.                This error means that a file name didn't follow the @ on the
  2746.                command line.  You must specify a command file name
  2747.                immediately after the @ (no space between the @ and the file
  2748.                name).
  2749.  
  2750.           Command file not found: FILE.EXT
  2751.                This error means that the specified command file doesn't
  2752.                exist.  Keep in mind that although Turbo SNR allows
  2753.                wildcards to be used with input files they are not supported
  2754.                for the command file names.  Only the first matching file
  2755.                for a given command file specification will be used.
  2756.  
  2757.           Decimal number is out of range (0-255).  Use HEX # instead.
  2758.                This error is displayed when an embedded decimal number
  2759.                specification in the substitution string (\999) is greater
  2760.                than the max allowed (255).  If you wish to specify a
  2761.                sequence of bytes in numeric format you must use HEX mode
  2762.                (see discussion on Substitution Strings on page 31 for
  2763.                details).
  2764.  
  2765.           Disk full writing temp file!
  2766.                This error is displayed if there isn't enough free space on
  2767.                the drive the temp file is being created on.  Turbo SNR
  2768.                creates the temp file on the current drive and directory.
  2769.  
  2770.           ESCape pressed.  User aborted.
  2771.                This message is displayed when you press the ESCape key at
  2772.                one of the prompts displayed during interactive mode.  Turbo
  2773.                SNR displays this message to let you know why it aborted.
  2774.  
  2775.           Ignore Case flag required to keep existing case.
  2776.                This error occurs when you specify Turbo SNR should keep
  2777.                existing case without also specifying to ignore case when
  2778.  
  2779.  
  2780.           Turbo SNR - Users Guide                                        49
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.                searching.  Turbo SNR considers it to be an error if you use
  2789.                the keep case option without using the ignore case option.
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.           50                       Turbo SNR - Appendix A, Program Messages
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.           Internal inconsistency.
  2848.                This error is an internal error message.  Please report any
  2849.                occurrence of this message, and if possible a set of steps
  2850.                that will help reproduce the problem so it may be looked
  2851.                into.
  2852.  
  2853.           Invalid option
  2854.                This error is displayed when you specify a command line
  2855.                option that is not valid.  Type SNR ? or SNR /h for a list
  2856.                of all the valid options.
  2857.  
  2858.           Invalid [] range.
  2859.                This error is displayed when the range for a class is
  2860.                specified in an incorrect manner.  A typical example of this
  2861.                would be:  [9-1].  The first value of the range must be the
  2862.                smallest value.
  2863.  
  2864.           Invalid context flag:
  2865.                This error occurs when Turbo SNR detects an invalid context
  2866.                flag specification in the input file (see the discussion on
  2867.                Substitution Strings on page 31 for details on how Turbo SNR
  2868.                evaluates substitution strings).
  2869.  
  2870.           Invalid replace group specifier
  2871.                This error occurs when regular expressions are used and you
  2872.                specify a replacement group that is non-numeric.
  2873.  
  2874.           No valid file(s) specified.
  2875.                This error occurs when Turbo SNR can't locate any of the
  2876.                input files specified and you have directory searching
  2877.                turned off.  This means the input files you specified don't
  2878.                exist.
  2879.  
  2880.           Nothing to do!
  2881.                This error occurs when Turbo SNR doesn't have anything to
  2882.                do.  This means that no substitution strings were specified
  2883.                and none of the options like 8th bit stripping were
  2884.                specified.
  2885.  
  2886.           NULL expression before closure.
  2887.                This error occurs when using regular expressions if you
  2888.                attempt to use closure (@ +) before defining a character to
  2889.                use them on.  See the discussion on regular expressions on
  2890.                page 20 for details on using regular expressions.
  2891.  
  2892.           No search value specified.
  2893.                This error occurs when a substitution string doesn't contain
  2894.                a value to search for.  Look at the offending line and
  2895.  
  2896.           Turbo SNR - Users Guide                                        51
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.                insure you typed the substitution string in as intended. 
  2905.                See the discussion on substitution strings on page 31 for
  2906.                details.
  2907.  
  2908.           Out of memory.
  2909.                This error occurs when Turbo SNR doesn't have enough memory
  2910.                to process all the substitution strings and/or file names
  2911.                that you specified.  If this error occurs you'll have to
  2912.                specify fewer files, turn off searching directories, and/or
  2913.                reduce the number of substitution strings specified at once. 
  2914.                In most cases this error will only occur when you search
  2915.                subdirs and Turbo SNR is working on a very large number of
  2916.                files at once.
  2917.  
  2918.           Regular expressions not valid across newline.
  2919.                This error message is displayed if you specify a
  2920.                substitution string that attempts to use regular expressions
  2921.                in a way that wraps around the end of line.  Regular
  2922.                expressions may only be used to go up to (and optionally
  2923.                include) the end of line.  If you wish to wrap around lines
  2924.                you must not use regular expressions.  See the discussion on
  2925.                regular expressions on page 20 for details on the use of
  2926.                regular expressions).
  2927.  
  2928.           Replace group specifier (999) is out of range.
  2929.                This error occurs when regular expressions are used and you
  2930.                specify a replacement group that is out of range (i.e. you
  2931.                ask Turbo SNR to replace with regular expression group 5
  2932.                when there is only one group defined).  See the discussion
  2933.                on regular expressions on page 20 for details about using
  2934.                replacement groups.
  2935.  
  2936.           Replace value too long (255 chars max!)
  2937.                This error occurs if you attempt to specify a replace value
  2938.                that is longer than the maximum allowed by Turbo SNR.
  2939.  
  2940.           Search value too long (255 chars max!)
  2941.                This error occurs if you attempt to specify a search value
  2942.                that is longer than the maximum allowed by Turbo SNR.
  2943.  
  2944.           Too many nested RE groups - Max is 10!
  2945.                This error occurs when using regular expressions if you
  2946.                specify more groups in the search portion of the
  2947.                substitution string than Turbo SNR allows.
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.           52                       Turbo SNR - Appendix A, Program Messages
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.           Trailing \ is not allowed.
  2964.                This message is displayed when the last character on a line
  2965.                in a command file is a single \.  \ is not allowed as a
  2966.                single character (you probably meant to use \\ instead of a
  2967.                single \).
  2968.  
  2969.           Unable to open temp file (FILE.EXT)
  2970.                This error occurs when Turbo SNR is unable to open it's temp
  2971.                file for writing.  Turbo SNR uses a temp file name of
  2972.                S_N_R_V1.CBL (which is written to the current directory). 
  2973.                Turbo SNR must be able to open and write to this file to
  2974.                operate properly.
  2975.  
  2976.           Unexpected '=' in replace value
  2977.                This error occurs when a substitution string contains more
  2978.                than one equal sign.  If you want to search for a string
  2979.                containing the equal sign or replace with a string that
  2980.                contains an equal sign you need to precede the equal sign
  2981.                with a backslash.  See the discussion on substitution
  2982.                strings on page 31 for syntax.
  2983.  
  2984.           Unexpected context specifier
  2985.                This error occurs when Turbo SNR detects a context
  2986.                specification in the substitution string where it didn't
  2987.                expect one (this is caused by using a colon in the
  2988.                search/replace string without remembering to precede it with
  2989.                a backslash).  See the discussion on substitution strings on
  2990.                page 31 for syntax.
  2991.  
  2992.           Unmatched []
  2993.                This error occurs when regular expressions are used and a
  2994.                substitution string has the start of a set but doesn't
  2995.                contain the closing bracket.
  2996.  
  2997.           Unmatched {}
  2998.                This error occurs when regular expressions are used and a
  2999.                substitution string has the opening brace but doesn't
  3000.                contain the closing brace.
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.           Turbo SNR - Users Guide                                        53
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.           AAppppeennddiixx BB -- SSppeeeedd CCoonnssiiddeerraattiioonnss
  3021.  
  3022.           Turbo SNR was designed to provide extremely fast search and
  3023.           replace capabilities, however, under certain conditions even
  3024.           Turbo SNR can be slowed down somewhat by the options that are
  3025.           being used.  The following table lists the options that have an
  3026.           effort on speed in worst case order (items with the greatest
  3027.           impact on speed are listed first).  Suggestions for speeding each
  3028.           of the items are listed in the table as well.
  3029.  
  3030.            Time Consumption  Description and Suggestions for Speeding
  3031.                Problems      Things Up
  3032.  
  3033.  
  3034.            A large number    The number of replace strings specified has
  3035.            of search         a great effect on how fast Turbo SNR
  3036.            strings           operates.  Since Turbo SNR must perform a
  3037.                              linear search to insure checking all valid
  3038.                              options it will take longer as new strings
  3039.                              are specified for searching.
  3040.  
  3041.                              Suggestions:   Use the one-one table where
  3042.                                             possible since one-one table
  3043.                                             entries have virtually no
  3044.                                             processing overhead
  3045.                                             associated with them.
  3046.  
  3047.            Use of regular    Using regular expressions is significantly
  3048.            expressions       slower than searching using other methods.  
  3049.  
  3050.                              Suggestions:   Avoid the use of regular
  3051.                                             expressions when possible.
  3052.  
  3053.            List matching     Due to the relative slow speed data is
  3054.            lines             displayed to the screen each of these three
  3055.                              options will eat a great deal of processing
  3056.            List matching     time.
  3057.            line numbers 
  3058.                              Suggestions:   Avoid using the options that
  3059.            Count Matches                    cause Turbo SNR to produce a
  3060.                                             lot of output.
  3061.  
  3062.                                             Redirect Turbo SNRs output to
  3063.                                             a file when using any of
  3064.                                             these options.
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.           54                   Turbo SNR - Appendix B, Speed Considerations
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.            Time Consumption  Description and Suggestions for Speeding
  3079.                Problems      Things Up
  3080.  
  3081.  
  3082.            Use of ASCII      Using ASCII mode is a little bit slower than
  3083.            mode              using the binary search method due to the
  3084.                              extra processing required to handle the line
  3085.                              terminators.
  3086.  
  3087.                              Suggestions:   Avoid the use of ASCII mode
  3088.                                             when possible.
  3089.  
  3090.            Use of the Word   Searching for words takes just a bit longer
  3091.            Flags             than would be required if the word flags
  3092.                              were off.
  3093.  
  3094.                              Suggestions:   Only use the word flags when
  3095.                                             it's really required.
  3096.  
  3097.           Other options have very little effect on the runtime speed of
  3098.           Turbo SNR.  The main time consumers are as listed in the table
  3099.           above.
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.           Turbo SNR - Users Guide                                        55
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.           AAppppeennddiixx CC -- TTeecchhnniiccaall SSppeecciiffiiccaattiioonnss
  3137.  
  3138.           The following table lists the limits when using Turbo SNR.  The
  3139.           limits can vary depending on the mode being used as shown in the
  3140.           table.
  3141.  
  3142.                                    Regular     ASCII mode   Binary
  3143.                                    Expr.                    Mode
  3144.  
  3145.  
  3146.            Maximum Line Length of  No limit    No limit     No limit
  3147.            Input Files
  3148.  
  3149.            Maximum Search String   255 bytes*  255 bytes    255 bytes
  3150.            Size
  3151.  
  3152.            Maximum Replace String  255 bytes*  255 bytes    255 bytes
  3153.            Size
  3154.  
  3155.            Maximum Memory for      45,000      45,000       45,000
  3156.            table space             bytes       bytes        bytes
  3157.  
  3158.            Maximum Regular         10          Doesn't      Doesn't
  3159.            Expression Groups                   Apply        Apply
  3160.  
  3161.            Maximum Command Files   No limit    No limit     No limit
  3162.  
  3163.            Maximum substitution    No limit    No limit     No limit
  3164.            strings
  3165.  
  3166.            Maximum Input files     No limit    No limit     No limit
  3167.  
  3168.            Maximum File Size       No limit    No limit     No limit
  3169.  
  3170.           * Regular expression wildcards can be used to match values longer
  3171.           (and replace using values longer) than the 255 character limit.
  3172.  
  3173.           All entries listed above as no limit have no limitations imposed
  3174.           by Turbo SNR, however, memory limitations do apply as each
  3175.           requires some amount of the limited table memory.
  3176.  
  3177.           Although there is no limit imposed by Turbo SNR on maximum input
  3178.           file size, enough free space on the current drive and directory
  3179.           is required to create the new file.  (Turbo SNR doesn't directly
  3180.           modify the original file - Turbo SNR was designed to be safe in
  3181.           the event of a power failure).
  3182.  
  3183.  
  3184.  
  3185.  
  3186.           56               Turbo SNR - Appendix C, Technical Specifications
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.                                                                       IInnddeexx
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.           Turbo SNR - Users Guide                                        57
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.           8th bit                                 option  29
  3257.                stripping  12                 keep old case
  3258.           ASCII                                   option  15
  3259.                mode  12                      line numbers
  3260.                Word Star Conversion               listing  12
  3261.                     12                       line terminators  12
  3262.                backup                        list lines
  3263.                name generation  13                option  17
  3264.                option  13                    maximum
  3265.           calling                                 groups  26
  3266.                Turbo SNR  8                  messages
  3267.           case                                    error  49
  3268.                ignoring  15                       informational  45
  3269.                keep existing  15                  warnings  48
  3270.           characters                         modes
  3271.                special  36                        ASCII  12
  3272.           command file                            interactive  29
  3273.                contents  40                  multi-pass
  3274.                details  40                        processing  43
  3275.           command files  9                   one-one table
  3276.                using  40                          context restrictions 
  3277.           context modes                                18
  3278.                details  31                             option  17
  3279.                one-one restrictions          options
  3280.                     18                            command line  9
  3281.                     using  31                     descriptions  12
  3282.           count                                   overview  8
  3283.                option  14                         specifying  10
  3284.           directories                        parameter
  3285.                searching  14                      types  8
  3286.           error                              parameters,
  3287.                messages  49                       optional  6
  3288.           files                              precedence
  3289.                command  40                        regular expressions 
  3290.           groups                                       25
  3291.                maximum allowed  26                programmer words
  3292.                regular expressions                option  19
  3293.                     23                       regular expressions
  3294.                replacing with  24                 evaluation  25
  3295.           hi bit                                  groups  23
  3296.                stripping  12                      option  20
  3297.           ignore case  15                         replacement using 
  3298.           informational                                23
  3299.                messages  45                            wildcards  21
  3300.           interactive mode                   replace string  34
  3301.  
  3302.           58                                              Turbo SNR - Index
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.           replacment
  3311.                with groups  24
  3312.           search string  34
  3313.           searching
  3314.                directories  14
  3315.                order  42
  3316.           special characters
  3317.                in strings  36
  3318.           speed
  3319.                considerations  54
  3320.                improving  54
  3321.           string specifiers
  3322.                using  34
  3323.           strings  34
  3324.                in command files  40
  3325.                including white
  3326.                     space  35
  3327.                using special
  3328.                     characters  36
  3329.           substitution string
  3330.                option  26
  3331.                syntax  27, 31
  3332.           substitution strings
  3333.                details  31
  3334.                in command files  40
  3335.                order looked for  42
  3336.           syntax
  3337.                for substitution
  3338.                     string  27
  3339.                for substitution
  3340.                     strings  31
  3341.           tables
  3342.                one-one  17
  3343.                order processed  42
  3344.           verbose
  3345.                option  28
  3346.           warning
  3347.                messages  48
  3348.           white space
  3349.                in strings  35
  3350.           wildcards
  3351.                regular expressions 
  3352.                     21
  3353.           Word Star
  3354.                convert to ASCII  12
  3355.           words
  3356.                option  28
  3357.                programmer  19
  3358.  
  3359.  
  3360.           Turbo SNR - Users Guide                                        59
  3361.  
  3362.